﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Crank.Core
{
    public class ConsoleWritingLineProvider : ILineProvider
    {
        private ILineProvider source;

        public ConsoleWritingLineProvider(ILineProvider source)
        {
            this.source = source;
        }


        #region ILineProvider Members

        public bool HasLines
        {
            get { return source.HasLines; }
        }

        public string GetNextLine()
        {
            string current = source.GetNextLine();
            Console.WriteLine(current);
            return current;
        }

        #endregion
    }
}
